<me:UIWB19 x:Class="WPFExcelReport.TWB19PTN"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT"  
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    xmlns:HR="clr-namespace:WPFExcelReport;assembly=THRSTAMM"  
                   x:Name="TV"
                    FontSize="14" 
                    Loaded="Window_Loaded"
     >
    <me:UIWB19.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:SDKEYCONV x:Key="sd"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:NOTBoolToVisibilityConverter x:Key="nbv"/>
    </me:UIWB19.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel> 
        <WrapPanel>
            <Button   Click="NewCommand" Height="40"  Margin="5,0,0,0" Width="40" VerticalAlignment="Center" >
                <Button.Background>
                    <ImageBrush  ImageSource="/ImagePackage;component/Images/Add.png" />
                </Button.Background>
            </Button>
            <Button   Click="DeleteCommand" Height="40"  Margin="15,0,0,0" Width="40" VerticalAlignment="Center" >
                <Button.Background>
                    <ImageBrush  ImageSource="/ImagePackage;component/Images/Remove.png" />
                </Button.Background>
            </Button>
                <Button   Click="SaveCommand" Height="40"  Margin="15,0,0,0" Width="40" VerticalAlignment="Center" >
                    <Button.Background>
                        <ImageBrush  ImageSource="/ImagePackage;component/Images/Save.png" />
                    </Button.Background>
                </Button>
                <Button   Click="DownCommand" Height="40"  Margin="15,0,0,0" Width="40" VerticalAlignment="Center" >
                    <Button.Background>
                        <ImageBrush  ImageSource="/ImagePackage;component/Images/arrow-up.png" />
                    </Button.Background>
                </Button>
            </WrapPanel>
            <WrapPanel Margin="0,10,0,0" VerticalAlignment="Center">
                <TextBlock Text="{Binding Source={Localization:Translate Word=上:}}"  FontSize="20" VerticalAlignment="Center" />
                <ex:NumericBox Text="{Binding WBFLGVON ,Converter={StaticResource d100}}" Margin="10,0,0,0" DecimalPlaces="1" FontSize="20"  Width="80"  />
                <TextBlock Text="{Binding Source={Localization:Translate Word=下:}}"  FontSize="20" Margin="10,0,0,0" VerticalAlignment="Center" />
                <ex:NumericBox Text="{Binding WBFLGBIS, Converter={StaticResource d100}}" Margin="10,0,0,0" DecimalPlaces="1"  Width="80"  FontSize="20" />
                
               
            </WrapPanel>
            <WrapPanel Margin="0,10,0,10"> 
                <TextBlock Text="{Binding Source={Localization:Translate Word=左:}}"  FontSize="20"  />
                <ex:NumericBox Text="{Binding WBFVGUET,Converter={StaticResource d100}}"  DecimalPlaces="1" FontSize="20"  Width="60" Height="30" />
                <TextBlock Text="{Binding Source={Localization:Translate Word=中:}}"  FontSize="20" />
                <ex:NumericBox Text="{Binding WBFFILLER ,Converter={StaticResource d100}}"  DecimalPlaces="1" FontSize="20"  Width="60" Height="30" />
                <TextBlock Text="{Binding Source={Localization:Translate Word=右:}}" FontSize="20"  />
                <ex:NumericBox Text="{Binding WBFBRTBIS ,Converter={StaticResource d100}}" DecimalPlaces="1"  FontSize="20" Width="60" Height="30" /> 
            </WrapPanel>
        </StackPanel>
        <DataGrid  Grid.Row="1"   
                   Visibility="{Binding IsKEY,ElementName=TV,Converter={StaticResource nbv}}"
                   VerticalAlignment="Top"  
                   AutoGenerateColumns="False"
                   EnableRowVirtualization="False"
                   IsReadOnly="True"
                   VerticalScrollBarVisibility="Auto"
                   HorizontalScrollBarVisibility="Auto"
                   HeadersVisibility="Column"     
                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}" 
                   IsSynchronizedWithCurrentItem="True" 
                   x:Name="dlgMaster"   
                   RowHeight="28"
                   RowDetailsVisibilityMode="Visible"  Margin="0,0,0,0"
                    >
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=WBFFPOS}" Header="{Binding Source={Localization:Translate Word=序号}}"  Width="40" />
                <DataGridTextColumn Binding="{Binding Path=WBFLGVON,Converter={StaticResource d100}}" Header="上"  Width="40" />
                <DataGridTextColumn Binding="{Binding Path=WBFLGBIS,Converter={StaticResource d100}}" Header="下"  Width="40" />
                <DataGridTextColumn Binding="{Binding Path=WBFVGUET,Converter={StaticResource d100}}" Header="左"  Width="40" />
                <DataGridTextColumn Binding="{Binding Path=WBFFILLER,Converter={StaticResource d100}}" Header="{Binding Source={Localization:Translate Word=中}}"  Width="40" />
                <DataGridTextColumn Binding="{Binding Path=WBFBRTBIS,Converter={StaticResource d100}}" Header="{Binding Source={Localization:Translate Word=右}}"  Width="40" />
            </DataGrid.Columns>
        </DataGrid  > 
    </Grid>
</me:UIWB19>
